/*
 * @Descripttion: 
 * @version: 
 * @Author: huangyong
 * @Date: 2019-11-22 15:37:47
 * @LastEditors: 
 * @LastEditTime: 2019-11-22 15:37:47
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    component: resolve => require(['../views/Index.vue'], resolve)
  },
  {
    path: '/demo1',
    name: 'demo1',
    title:'demo1',
    component: resolve => require( ['../views/Demo1.vue'], resolve)
  },
  {
    path: '/demo2',
    name: 'demo2',
    title:'demo2',
    component: resolve => require( ['../views/Demo2.vue'], resolve)
  },
  {
    path: '/demo3',
    name: 'demo3',
    component: resolve => require( ['../views/Demo3.vue'], resolve)
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
